renamed $config to $attr, more logical