Adding my own solution.