Implement chain output function