remove useless code duplication