Added given exception and matrix classes