add tensorproduct, some fixes
add tensorproduct, some fixes