hypot -> sqrt because of speed concerns