working on state machine, currently broken