finished video 31; i implemented the query Function