hopefully responds better to varying number of docs.