edit maset_state to manage the task