all the basic functionality for label_factory

this pull request holds all the basic functionality what is needed for label_factory to work