refactor user interface