solve encoding prob & almost complete extractor