to make ajax work