Complete ajax without looping