Found the culprit, now the program takes 25 min