cleaning up code for including direct on the book