Added variable i and anssigned 1