tweaked state transitions, now just two primary states. no idea if if compiles but simple changes