removing duplicates and verifying twice insertion. Next adding the step rules