refactoring Component UI