Now with binary search.. O(n) -> O(lg n) grouping become a bit faster.