implement iterating through result set