lab 6 - task 2 & 3