added initial ajax code