transition function added