Added function

Assignment 2