added transition matrix