move internal loop to separated file, speed up compilation !