refactor test package