use ajax instead of http