Modifications in the dictionary matching module. Monte-carlo test added.