working on read lines function