parses external input file