cleaned up async control flow