implementing operator algebra