Using the similar for loop pattern.