added save to JSON, save to query