replaced SYS_WAIT()