changed state dimensions and fixed init bugs