operator tests and refactoring