Updated my solution.