close and reset