added grouping by contest group, support for getting contest by related items