optimization to crossjoining for basis tensor purposes