updated to read json from file