remove select_state function