Addedd function self.update_title() to update the title.