ton of changes optimizations and the addition of a new dictionary