add eventDataExtractor function