refactor test packages