adpated for multiple domains