quickly sort method