working on new domain-mean ra function