adding more events
adding onBegin and onFinish for transitioning