add edit event functionality