change logic to find next_book - not using primary key anymore