making stuff thread safe (not there yet)