Changed sorting API to fit to common interface for benchmarking purposes