Duplicate checking implemented.