unit tests, simplifying matrix product methods