Two sorting method