adding missing to reset
adding state machine to add_sh.py