Restructered thte resultset processing