encode as an operator