collection: move doc to be near function.