added duplicate code