added edit event functions