Add save function for package