solve bag in tabular input - queries and hits corespond by identifier and not by idnex