collectRows method