updated for async process