added snippet; for loop with x