implement mean,stddev by own instead of numpy lib