modify the dirs structure