Implemented restore option and also made a refinement for the  touch event