DB: add state check option to change_state