make calls on separate thread, add null check