added solutions for matrix operations