implemented cube slice