replecated the changes in the cubeplex functions