added 'end()' function to signal the end of the query