Task 2 of assignment 1