changing statement to queryStatement