removed unused line of code
fixed up accidental diverge and changed regex