Nit: since this is only called once is there any reason not to inline it?