Added code that calculates the distance between two strings