label matching and tests