Convert to async thread