new version uses a regular expression instead of creating a HashMap and looping over them. Needs testing before pushing to origin
new version uses a regular expression instead of creating a HashMap and looping over them. Needs testing before pushing to origin