properly refresh using result of XHR on success