#1070 restructuring
#1084 first iteration json output