Updated controller to handle new todo