My original solution.