added format handling for formats other than json