add distance measure and kramdown