modified for new directory strucutre, still incomplete