wrote regex patterns