refactoring and added test for simple OT scenario (not yet passing)