Past continuous vs. past simple
'when':
''When the phone rang, she was writing a letter.''
'' What were you doing when the earthquake started?''
'while'
''What were you doing while you were waiting?''
''I was studying while my father was making dinner.''