changed local defn of vmin, max, center