brute force problem 5