close and resume