Solution to challenge 145