switching out the old data for the new, in both cases