compiling code for directories and attributes