adding method to parse directory of files