tried an idea to speed up dic calculation. no good. going with original.