some typos and np.mean