added solution to problem 1