added sleep in scan