performance improvement 1-arc vectors are stacked properly 2-matlab's kronocker product is replaced with simpler outerproduct