Added runQuery method in database