implemented edit distance. started doing tests