added thread safety option
Merge pull request #1 from rkasbach/master

added thread safety option