replace functions with call to self.cube