bug 1138: added function get_domains