added solution for hw1 problem 10