util.py with book indices