contestada

Read the sentence. hearing the key in the lock, the delighted dog dashed to the front door. how is the underlined prepositional phrase used in the sentence?