create a GreedUI class and refactor all UI functions into that class