Solving reddit challenge #128