bruteforce sort