Changed lev dist to original function