replaced the previously b0rked FSM with a ISM (is that even a thing?) which is much simpler but useful