separated logic and the output display