added sleep to avoid timeout