Adding getLabels function