added validStates method