changed to read lines from txt file