switched to vector magnitude, more baseline implementation