making sure data is moved instead of being copied