state_to_recursion