better gen output functions