change cleanup to set instead of list