do a real `if` block and move the regexp initalization stuff here