functions for add directory and remove directory

they're not complete but pretty close