rewrite the structure of the package