State machine impl start

----------------------
branch [[master]]