removed async from ajax handling