Add pack function(Internal merge)