Operation implementation with tests
Implement operation and tests