added edit event handler - sorta works