adding answer for Assignment 7 - Exercise 1