now gets input from file and iterates through adding txt file