Fixed bug in commonDomain function that allowed returning of negative values
more advances in the hierarchical classifier