refactoring operators, add diff support