changes the directory order