refactored index and collection stats #609