1. Added support for outputing namedtuples