handle duplicates but still have little bug