move all the operator logic into type handlers