another variation on wait command