replaced open() calls with self.opened()