changed interfaces to to use row iterator - implementation is still based on set