apply functionality of reset button.