get range automatically