silly idea to sort without braching, but by calculating rank per elem