Added operators and wrote getOp function