added input parsing of input.txt file