changes to directory scanning