work on json saving