You should initalize i to 2 during declaration also.