Added code for home assignment 1