UI logic is now moved to a function
extracted ui rendering into seperate object