HW6:task2: done