pulled out state machine as unnecessarily heavy