construct the function used to transfer long vector.