refactored and added support for Actor FSM