move test code out off library