modify the directory struct