fix events, add two types of event