Renamed the index var to i for consistancy