refactoring duobi