bruteforce solution