use FSMs, they be good