changed from querying by INames to IIDs, fixed groups dictionary for improved relevancy