updated to use order 0 of result set