Solution for HW Unit 4 task 6