replace timeout by interval