using ConcurrentHashMap so that synchronised blocks can be removed

Signed-off-by: Mikolaj Szabo <savingprivateblue@gmail.com>