refactored manage_todos_spec