Statistics needed for metadata now implemented and tested