Added some code adjustments

With the last git in mind, I was able to add in Joes code. Now I
understand why he had 0 on the if (i==0). His statements were true
under those circumstances. While I mine had to be true under if (i==1).