7. This is very similar to problem 6, do this the same way.