put a Lock around the data setting/using