Adding some methods to Matrix