find mean of a vector