updated response to support close event