add events
fix bugs