changed self.dtype to self.default