added several methods for label matrix