added "template" json formatting and tests