made queries to create json files