enhancements to enable statistics to be created in the system, and associated tests