Changes for loop from array to seq