synchronize access to mutable map