added findEmptyRow method and test case