use pythag distance