Update sort method