finished the book a ticket function