Solution to the reddit challenge #131