Fairly tedious problem.