added ability to read from json