update to use new xhr methods