refactor upgradeactionmessage