Duplicates check added. resolves #1