add maxlength to str