add mutex for class variables