fix naming issue, use constant for regex and DRY code