updated to include JSON files in decide function