refactor internals with amp-message