change FSM onXXX Functions