added do-while for reading a lot of text