added accept_states method