turned data into a json. Initially it just included variables