refactor task 2