updated to use json file with credentials