loop through blocks