add example of a user-defined statistic function