make extractor shell script simpler