Add support for multiple domain

fixed #293