change wait logic