updated to use a config option