removed old packing functions