modify Translation's sorting algorithm