atomic map implementation