TODO: added some comments to self.