trying to fix a 50 times slower issue