More elegant solution.