Changed api to accept event and option data field.