fixed typo.  dot(v,v) -> dot(n,n)