added parsing algorithm that eliminates the need for mutiple output files.