I think I might be wrong about the Finite State machine. I have seen some people do this with while and do