Updated sample code to output strings instead of objects.