delete duplicate code