move test code to t/