extracted method to reuse in AutoIdStrategy