changed interfaces to to use row iterator