rewrote whoosh integration