Implementation of Assignment 2

Code changes to implement funtions