refactor task 3