Issue 1058: added factory for labels
Merge pull request #1083 from gsomix/feature/issue1058

added factory for labels