locking: use pointer instead of strings