clean code that generates output