last changes. Bug in the library in changeState. It truncates 3D matrices to 2D Matrices and it shouldnt