refactored out function

added more test.json files