What word or phrase is modified by the prepositional phrase in the sentence below?

Mindy preferred sitting on the floor whenever she did her math homework.
A.
Mindy
B.
homework
C.
floor
D.
sitting