modified to address possible race condition by the async nature of restler.get