adding and removing from the local history when toggling books