CODE: state_to_recursion