This is the working verion to problem 5 of homework one