refactor UI