simple brute force problem