string distance for browser