I am puzzled because I did not see any " while s" in your sentences. It seems like you are asking about writing sentences with 2 independent actions and using the past continuous verb forms. The -ing form is used to indicate an action that happened over a period of time.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.