Copy function recreated in population.cu