adapted to use LocalHashMap from hashbase