move `$params['name']` into var. is used multiple times.