generalized set-* functions in namelist and added max-domains function