change from read to readline