Brute force solution.  Slow but working