changed .states to .getStates