change statistics fields to functions