performance issue - using regular ex is too slow for that case