ajax call has to be synchronous?