added duplicate validation