Add helper method for printing matrices