reworked Basis and implemented TensorState