logic changed to decide async