Completed question 2a of first assignment