modifying state machine, getting closer to done