refactor UserInterface