replace manual packing with rex version