updated functions to output objects