update to xhr callback