fix extractor.

fix extractor to work, still in testing.
it's not final version and will change.