crashed by some reason about sorting.NEED TO FIX