Optimization to invRange