added edit event functionality