implemented maxNumberOfLine functionality