updated the packing kernsl to be consistent iwth 3d versions