change waiting ajax code