packer implementation