which might be helpful to avoid race conditions