rewriting package declarations