correct return value in transferLabels function