finish HKstatisticsViewController and reset function