Assignment 2 - Add code for the two functions