added ModOp error functionality