there is not very much difference in meaning between these two pairs of sentences. Sometimes we can use an -ing or past participle from emphasizes that the first action has been completed before the second action begins. Thus, we could paraphrase these two sentences as follows