before refactor user interface