almost finished Library program