Instead of always sleeping for 1 second, add configurable amount of sleep
Instead of always sleeping for 1 second, add configurable amount of sleep