add OnClose(), rename callback to OnResponse