modified ajax script