Re-written first problem.