Switched similar sorting to buckets