refactored extractor to new data format