Implementing new method atomic_get_or_create