not possible to use self.type here?