started refactoring ttt