final code for TestViewBook.py