fixed up extraction scripts