HW7 task almost completed. To be continued