writing and reading modified json working
all bugs fixed!