add whence library, and test it.