refactor the package structure