Added a function for normalizing a vector, so each element is normalized i regards of the largest element in the array