updated extracting scripts