removed unnecessary try catch from matrix classes