refactores stateOption and stateOptions to state and states