An overview of Finite State Machines