renamed set_state