Use better range calculation