Improved the code of the todo