keep a hash of selected ids for performance of large datasets