added sleep to example