revise test code to use package