For loop index now only reaches the index length - 1.  Storing the current pin object in var for easier referencing.