- wrote clone function for packed