refactoring ui