fix error messages, improve messaging
tests for regex