improve runSQLQuery a bit