rewrote dictionary wordmapping, updated regex