add packing source
modify packing code