trying to loop through logs