refactor ui using