refactoring UI