added checkDim to Ops.R