Added ability to pass an array to the Query funciton.