trying to fix a 40 times slower issue