 			tail = collection
 				.find(tailQuery, projection)
 				.sort(sort)
-
-			#console.log 'tailQuery is', tailQuery
 
 			# now find any packs that overlap with the time window
 			overlapQuery = _.clone(query)

		seen = {}
		newResults = newResults.filter (item) ->
			key = item.doc_id + ' ' + item.v
			#console.log 'key is', key
			if seen[key]
				return false
			else

	#   {
	#     "doc_id" : 549dae9e0a2a615c0c7f0c98,
	#     "project_id" : 549dae9c0a2a615c0c7f0c8c,
	#     "pack" : [ U1, U2, U3, ...., UN],
	#     "meta" : {	"user_id" : 52933..., "start_ts" : 1422310693931,	"end_ts" : 1422310693931 },
	#     "v" : 17082
	#   }
	#
	#  where U1, U2, U3, .... are single updates stripped of their
	#  doc_id and project_id fields (which are the same for all the
	#  updates in the pack).
	#
	#  The pack itself has v and meta fields, this makes it possible to
	#  treat packs and single updates in the same way.
	#
	#  The v field of the pack itself is from the first entry U1
	#  The meta.end_ts field of the pack itself is from the last entry UN.

	findDocResults: (collection, query, limit, callback) ->
		# query - the mongo query selector, includes both the doc_id/project_id and
