add auto reset implementation

add InsertEnter as a timing for reset
implement timeout feature

forget removing a debug message

add comment