remove duplicate code in configuration ext