replaced deprecated function in ajax call