for loop changed to start at 1