implemented undo option in animation mode for setup and init