add statistic function to person class