adding conditionals so as not to overwrite config