Change variable named  'i' to 'pin'