modify the code for new directory structure