refactor ui heric