Adding hw2 functions to the file