change deprecated ajax functions