Cleaner solution to the problem.