remove duplication using getRows abstraction.