added debugging information and fixed a minor bug -- not reading in enough