wait command and some scripts