set up edit event