first pass at brute force implementation