Added new functions to matrix