brute force code