refactor the user interface