fixed bugs for reading 4 lines