change the ranges for two variables