add maximum buffer length