using sets of ids instead of sets of objects