modified addTodo()