x can now be a vector

made a small change in order to allow x to be a vector. In which case the mean will be computed and the standard deviation will be divided by sqrt(n).