refactoring for operator