using bad "while" statement not using 0 in array.