added regex whitelisting