add package feature, split sampling, write output file