Complete strDist fuction