fix the bug in statistic
new function -- adding note