correctly return sqrt of array / vector