working on backing up and restoring via json (rewriting it)