abstracting the ui a bit