clean example using direct output