Added function to check for dupe items