use apply_async instead of apply (which blocks)