Very first version of State Machine