stopping automatically after one preselected time interval