updated files , add loop for analysis