replace every meaningless wait function