clone function for creating a new vec from other