Added interface for sorting algorithm