fix to make the regexp more readable
finish up the unit testing