use isLast for resultset check