 			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)

				# need all the updates at the final time to avoid breaking
				# the changeset into parts
				updates = PackManager._filterAndLimit(updates, extraSet, filterFn, null)
				#console.log 'extra updates after filterandlimit', updates
			tail.toArray (err, result2) ->
				if err?
					return callback err, updates.sort timeOrder

				if x > y then 1 else if x < y then -1 else 0

			updates = PackManager._filterAndLimit(updates, unpackedSet, filterFn, limit)

			# get all elements on the lower bound (cutoff)
			tailQuery = _.clone(query)
