fix the tests and regex