add some output functions for JSON