Use nested loops