documents are now Node rather than Elem in collection logic