Exercise 2 of Course Project