use norm for distance calculation
seems to address bug #1, at least for the 1d case