Completed question 1 of assignment 2