Speed up #7.
Solve #8.