modified for altered dir structure