Improved ids extractor