runQuery updated