added ability to read lines from a file