cube implementation - draft 1
further cube and dimension adjustments