refactory summary max length var