implemented Edit Event.