updated parsing of files