Added states and transition matrix. Stable and 100% result