improved smart algorithm

fixed some issues with dictionary file