delete and reset res