modified query to just take classes which have a label for properties