analysis of loops