wrap on queue to avoid race