added mkdircd function