Added function to normalize input vector V.