creating book sorting program that displays titles vertically