bad solution to 50
Much nicer solution to 50