modifications to addundoState (still deactivated)