some refactoring inResultSetWrapper