Changed the performQuery to execute and refined it a little.