fixed change range function