Adding transitions between states