Fixed the logic to remove entries belonging to multiple sets in the sample data