linked json files to function