added documentation
added sleep to stop spinning