added shim and removed min