added xhr example code