added method for data to json for events
added method for getting distinct ids from events