finished up to problem 10