added close call to query tutorial