changed all states to FiniteStateClass