add print_book function