don't pass matrices by value, pass by const reference