Added third transition code.