added example of setting transition in code