refactoring uarts in phase2 model