trying to make sense of math
Somebody smarter's solution