added the function mean and it's tests