pack and extract