5/27/14 Working Code

Before switching the first for loop to a while loop