changed createTransition to instance method.