assignment2 - task3 & task4