separated parsing scripts into two separate files, optimization attempt at input.txt building