performance tweaks in the pack methods