added DOF, Multiway calculation