querying and distinct collections
tests now counting before and after nodes