try wrapping getNextResult in a scope