doing delete event function, get lastest code
fix bug