changed to use jsonify to create event json.