sort and remove ../ for displaying