start transition matrix coding