build puzzle first pass, brute force code, closure and equation would simplify greatly