writes data to json, allows saving, auto-redirects