add mergeObjects function for merging default and user-specified settings