the for loop is definitely wrong