added book quantity logic