update logic in todos_controller, todos#create, add helper method