Implemented global variable to only load query once at start of game