add functions and mkdircd command