add maxLength option, further tests