added norm and distance functions