Solution to reddit challeng 140