Rule reminder
Use the simple gerund for simultaneous actions; use the gerundio composto (avendo/essendo + pp) for prior actions. Attach pronouns to the end of the gerund.
… (studiare) ogni sera, Marco è migliorato molto.