Created a stack based Finite State Machine