adds edit function to events and tasks