Changed add function to addMatrix; now returns matrix.
addMatrix now returns a matrix.