Better range calculation