remove edit domain feature
remove code duplication