refactoring of OpenT