just some statistic functions, nothing fancy