added first state machine
readme changed