Updated the logic for length suggestion.