Bruteforce method implemented, not working