Added support for more than one histogram per class