written code for makeStates