implemented sorting dirrectory and mergesort, still needs comments and study