overload operator<<

removed printMatrix by overloaded cout