nit: instantiate profile after this `if`, not before