add feature to accept states as string in set_states method