changing min/max range and pixel click radius to parameters