added reduce to parse_files