example added for reading and writing json to file