abstracted out working out the config key