working prototype for word-distance graph