further implementation towards compatibility and functionality of gen_fsm