possibly working fix for regex check