bettor error handling and fixing of regex