change bool value to atomic