attempt to implement quick sort
implements quick sort