change name and del duplicate code