adding printRows method
unit test