looks like O(n*log(n))