delete and reset the res