When expressing someone or something (the subject), that remains in a certain state after performing an action, the noun mama is used. Mama is preceded by a verb in the ta (or da) form and is followed by another verb (in any tense) when indicating that the subject performs another action while in this unaltered state.
Kare wa tatta mama kēki o tabeta.
He ate the cake standing up.
Rūmumēto wa yoku terebi o tsuketa mama dekakemasu.
My roommate often goes out leaving the TV on.
Shōnen wa ryōte o poketto ni ireta mama kotaeta.
The boy answered with both hands in his pockets.
Hope this helps!
°˖ ✧◝(○ ヮ ○)◜✧˖ ° こゆうきあいはら °˖ ✧◝(○ ヮ ○)◜✧˖ °