added more domain checks