better length calculation