Convert book-critics var to function