Inserted Details of function

Updated the function as per assignment 2