Added proper text parsing (up to three lines)