added waittransform for each case