should we have some sort of a conditional set here, to avoid race conditions?