listOfRows method improvement