first run at making a book rendering function