added support for an external statistics script