moved to a private method - _extractId()