refactored clearCompletedTodos