created readsqlresults method