Sorting algo replaced with IEnumerable interface