cleaned up the book queries