added sort with 2 quadratic sort fns