refactors executeQuery operations in to functions