revert using a map for the commands