maybe move unset up to `$name = $params['name'];`