a more concise solution.