finished video 30; i implemented the closeConnection Function