added 'undo' to getCommandType()