added duplicate avoiding