length to max_length