major improvement to regex