Completed up to problem 7.