adding sleeps where needed to ensure services are up and running or finished a request